package com.ganee.agora.repository

import com.ganee.agora.api.MainApiService
import com.ganee.agora.model.CommentEntity
import com.ganee.baselib.httprequest.callback.RequestCallback
import com.ganee.baselib.mvvmlibrary.base.BaseRepository
import com.ganee.baselib.mvvmlibrary.base.BaseViewModel
import okhttp3.RequestBody

class TidbitsRepository(baseViewModel: BaseViewModel<*>) : BaseRepository(baseViewModel){

    /**
     * 获取评论列表
     */
    fun getCommentList(body: RequestBody, callback: RequestCallback<List<CommentEntity>>) {
        executeQuietly(getApi(MainApiService::class.java).getCommentList(body), callback)
    }

    /**
     * 获取评论列表
     */
    fun postComment(body: RequestBody, callback: RequestCallback<CommentEntity>) {
        executeQuietly(getApi(MainApiService::class.java).postComment(body), callback)
    }
}
